<!DOCTYPE html>
<html lang="en-US">
	
	<head>
		<meta charset="utf-8">
		<title>udeitor demo</title>
	</head>
	<body>
		<!--加载编辑器的容器-->
		<script id="container" name="content" type="text/plain">
			初始化内容
		</script>
		<!--配置文件 -->
		<script type="text/javascript" src="ueditor.config.js"></script>
	<!--编辑器源码文件 -->
	<script type="text/javascript" src="ueditor.all.js"></script>
	<!--实例化编辑器 -->
	<script type="text/javascript">
		var ue = UE.getEditor('container', {
    toolbars: [
        ['fullscreen', 'source', '|','logo', 'undo', 'redo', '|',
           'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'preview', 'searchreplace', 'drafts', 'help'
        ]
    ],
    autoHeightEnabled: true,
    autoFloatEnabled: true
});
var lang = ue.getOpt('lang'); //默认返回：zh-cn
 baidu.editor.commands['logo'] = {execCommand: 
 	function() { 
 		this.execCommand('insertHtml', "<img src='img/07ca7a35e2d036ce732f346e7939789c_02X58PICm4t.jpg' />");
 		return true;
 	}
 , queryCommandState: function(){
 		
 	}
 };
	</script>
	</body>
</html>
